package com.cesgroup.zw.spring.boot.library.echarts.line.complex;

import com.cesgroup.zw.spring.boot.echarts.component.Tooltip;
import com.cesgroup.zw.spring.boot.echarts.component.series.Line;
import com.cesgroup.zw.spring.boot.echarts.enums.Position;
import com.cesgroup.zw.spring.boot.echarts.enums.Symbol;
import com.cesgroup.zw.spring.boot.echarts.model.style.AreaStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.ItemStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LineStyle;

/**
 * @author ytj
 * @date 2019/7/8 17:05
 */
@SuppressWarnings("serial")
public class ComplexLineSeries extends Line {
    public ComplexLineSeries(ComplexLineParam param){
        this.setName("注册总量");
        this.setType("line");
        this.setShowAllSymbol(true);
        this.setSymbol(Symbol.circle);
        this.setSymbolSize(6);
        this.setLineStyle(new LineStyle(){{
            this.setColor("#fff");
        }});
        this.setLabel(new LabelStyle(){{
            this.setShow(true);
            this.setPosition(Position.top);
            this.setColor("#fff");
        }});
        this.setItemStyle(new ItemStyle(){{
            this.setColor("red");
            this.setBorderColor("#fff");
            this.setBorderWidth(3);
        }});
        this.setTooltip(new Tooltip(){{
            this.setShow(false);
        }});
        this.setAreaStyle(new AreaStyle(){{
            this.setColor("#eb64fb");
        }});
        this.setData(param.getDataset().get("value"));
    }
}
